#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
# @Time: 2023/6/16 10:55
# @Author: Anthony (anthony66888@163.com)
# @description: 
"""
import threading
import time

from auto_battle_room.auto_create_battle import auto_battle
from auto_battle_room.auto_join_battle import auto_join
from auto_battle_room import init_login

import datetime

now = datetime.datetime.now()
now_time = now.strftime("%Y-%m-%d %H:%M:%S")

print("工作开始啦，又是元气满满的一天！！！")
print(f"start time: {now_time}\n")

init_login()
print("全部用户登陆成功啦！！！")
time.sleep(3)


t1 = threading.Thread(target=auto_battle)
t2 = threading.Thread(target=auto_join)
# t3 = threading.Thread(target=auto_dream)
# t4 = threading.Thread(target=auto_open_case)

# 启动创建房间和参加房间、追梦、开箱的线程
t1.start()
t2.start()
# t3.start()
# t4.start()

# 等四个程序结束
t1.join()
t2.join()
# t3.join()
# t4.join()

now = datetime.datetime.now()
end_time = now.strftime("%Y-%m-%d %H:%M:%S")

print("今天的工作到此结束啦")
print(f"end time: {end_time}")
